import React from 'react'
import style from './index.module.css'

import classnames from 'classnames/bind'
let bindclassnames = classnames.bind(style)


class Cssstyle extends React.Component{
    state = {
        showflag:false
    }
    render(){
        console.log("qqq",style)
        return <div 
                className={bindclassnames({
                    innerstyle:true,
                    open:!this.state.showflag,
                    close:this.state.showflag,
                })}>
                测试模块化样式，动态修改样式
                <button onClick={this.changestyle}>修改样式----{this.state.showflag+''}</button>
               </div>
    }

    changestyle = ()=>{
        let flag = !this.state.showflag
        this.setState({
            showflag:flag
        })
    }
}

export default Cssstyle